var map = function (arr, fn) {
    for (let i = 0; i < arr.length; i++) {
        if (fn.length === 1) {
            arr[i] = fn(arr[i])
        }
        if (fn.length === 0) {
            arr[i] = fn()
        }
        if (fn.length === 2) {
            arr[i] = fn(arr[i], i)
        }
    }
    return arr
}